<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>01_复习-继承</title>
    </head>
    <body>
        <script>
            function Dog(name,age){
            }

            Dog.prototype.run = function(){
                console.log(1111);
            }


            function Teddy(name,age){
            }

            Teddy.prototype = new Dog();
            Teddy.prototype.constructor = Teddy;

            function Koki(name,age){
            }

            Koki.prototype = new Dog();
            Koki.prototype.constructor = Koki;


            var tt = new Teddy('怼怼',3);
            tt.run();

            var kk = new Koki('短短',4);
            kk.run();

            console.log(tt.run == kk.run);


        </script>
    </body>
</html>